package com.lhf.userservice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lhf.userservice.entity.FvsSysRole;
import com.lhf.userservice.vo.FvsSysAddPerForRoleVo;
import com.lhf.userservice.vo.FvsSysRoleVO;
import com.lhf.userserviceapi.dto.FvsSysRoleDTO;

import java.util.List;

/**
 * (FvsSysRole)表服务接口
 *
 * @author liuhf
 * @since 2021-03-29 16:01:55
 */
public interface FvsSysRoleService extends IService<FvsSysRole> {

    /**
     * 查询用户所有角色
     *
     * @param uid
     * @return
     */
    List<FvsSysRoleVO> findAllByUid(Long uid);

    /**
     * 为角色添加权限
     *
     * @param vo
     * @return
     */
    Boolean addPerForRole(FvsSysAddPerForRoleVo vo);

    /**
     * 删除角色权限
     *
     * @param vo
     * @return
     */
    Boolean delPerForRole(FvsSysAddPerForRoleVo vo);

    /**
     * 根据路径查询可访问的角色集合
     *
     * @param path
     * @return
     */
    List<FvsSysRoleDTO> findRoleByPath(String path);
}
